package data;

/**
 *
 * @author Stijn Verslycken, Jonas Van Den Bossche
 * @date 2007-2008
 */
public abstract class BuildingType {

    private String name;
    private int minLevel;
    private int maxLevel;
    private int[] cost = new int[5]; //food, wood, stone, iron, gold
    private int defaultStrength;
    private String imageUrl;
    private String btnImageUrl;

    /**
     * Constructor with all parameters.
     * @param name
     * @param minLevel
     * @param maxLevel
     * @param cost
     * @param defaultStrength 
     * @param imageUrl
     * @param btnImageUrl
     */
    public BuildingType(String name, int minLevel, int maxLevel, int[] cost, int defaultStrength, String imageUrl, String btnImageUrl) {
        this.setName(name);
        this.setMinLevel(minLevel);
        this.setMaxLevel(maxLevel);
        this.setCost(cost);
        this.setDefaultStrength(defaultStrength);
        this.setImageUrl(imageUrl);
        this.setBtnImageUrl(btnImageUrl);
    }

    /**
     * Constructor with all parameters, cost parameters splitted.
     * @param name
     * @param minLevel
     * @param maxLevel
     * @param foodCost
     * @param woodCost
     * @param stoneCost
     * @param ironCost
     * @param goldCost
     * @param defaultStrength 
     * @param imageUrl
     * @param btnImageUrl 
     */
    public BuildingType(String name, int minLevel, int maxLevel, int foodCost, int woodCost, int stoneCost,
            int ironCost, int goldCost, int defaultStrength, String imageUrl, String btnImageUrl) {
        this(name, minLevel, maxLevel, new int[]{foodCost, woodCost, stoneCost, ironCost, goldCost}, defaultStrength, imageUrl, btnImageUrl);

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMinLevel() {
        return minLevel;
    }

    public void setMinLevel(int minLevel) {
        this.minLevel = minLevel;
    }

    public int getMaxLevel() {
        return maxLevel;
    }

    public void setMaxLevel(int maxLevel) {
        this.maxLevel = maxLevel;
    }

    public int[] getCost() {
        return cost;
    }

    public void setCost(int[] cost) {
        this.cost = cost;
    }
    
    public int getDefaultStrength() {
        return defaultStrength;
    }
    
    public void setDefaultStrength(int defaultStrength) {
        this.defaultStrength = defaultStrength;
    }
    
    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }
    
    public String getBtnImageUrl() {
        return btnImageUrl;
    }
    
    public void setBtnImageUrl(String btnImageUrl) {
        this.btnImageUrl = btnImageUrl;
    }
}
